export const orderDefault = ['区域', '省份', '场站', '年份', '月份'];
export const orderOptions = ['区域', '省份', '场站', '年份', '月份'];
export const orderMap = {
  区域: 'region',
  省份: 'provinceCode',
  场站: 'stationName',
  年份: 'year',
  月份: 'month',
};
const num = 3;
const fn = (lv) => {
  let total = [];
  let arr = {};
  if (lv > 0) {
    const child = fn(lv - 1);
    if (child.total) {
      total = child.total.map((t) => t * num);
    } else {
      total = child.map((t) => t * num);
    }
    Array.from({ length: num }, (_, i) => {
      arr[`${orderOptions[orderOptions.length - lv]}_${i + 1}`] = child;
    });
    return { total, ...arr };
  }

  return Array.from({ length: 6 }, (_, i) => Math.random() * 100);
};
export const dataSource = {
  data: fn(5),
  meta: [
    'settleManageQuantity',
    'greenCertificateNum',
    'theoreticalTotalProduction',
    'issuingGreenCertificates',
    'greenCertificatesSold',
    'actualInventoryGreenCertificate',
  ],
};
export const chartsMap = {
  绿证申请情况: ['netEnvironmentalProductionTotal', 'environmentalProductivity'],
  绿证销售情况: ['issuingGreenCertificates', 'actualInventoryGreenCertificate', '_computerData'],
};

export const filter_dict = {
  北交所: 'beiJiaoSuo',
  中国绿证: 'chinaGreenCertificate',
  电源类型: 'projectType',
  开始月份: 'startMonth',
  结束月份: 'endMonth',
  环境类型: 'environmentalType',
  广交所: 'guangJiaoSuo',
  可再生: 'renewable',
  补贴类型: 'subsidizeType',
  白名单: 'whiteList',
};

export const customKeys = [
  'whiteList',
  'renewable',
  'chinaGreenCertificate',
  'beiJiaoSuo',
  'guangJiaoSuo',
];
